
export function createElement(vm,tag,data={},...children){ // _c(div,{id:'xxx'},_c(p,{}),__c(span,_v('hello))) => <div id="xxx"><p></p><span>hello</span></div>
    let key = data.key
    delete data.key
    return vnode(vm,tag,data,key,children,undefined)
}

export function createTextElement(vm,text){
    return vnode(vm,undefined,undefined,undefined,undefined,text)
}

function vnode(vm,tag,data,key,children,text){
    return {
        vm,
        tag,
        data,
        key,
        children,
        text
    }
}